using System;

namespace RaisingStudio.SmallBasicCompiler
{
	public class Error
	{
		private int _line;
		public int Line
		{
			get
			{
				return this._line;
			}
		}

		private int _column;
		public int Column
		{
			get
			{
				return this._column;
			}
		}

		private string _description;
		public string Description
		{
			get
			{
				return this._description;
			}
		}

		public Error(TokenInfo tokenInfo, string description) : this(tokenInfo.Line, tokenInfo.Column, description)
		{
		}
		public Error(int line, int column, string description)
		{
			this._line = line;
			this._column = column;
			this._description = description;
		}

		public override string ToString()
		{
			return string.Format("{0},{1}: {2}", this.Line, this.Column, this.Description);
		}
	}
}
